//
//  SetViewController.m
//  PCR
//
//  Created by shumei on 16/7/7.
//  Copyright © 2016年 shumei. All rights reserved.
//

#import "SetViewController.h"

@interface SetViewController ()<
UITableViewDelegate,
UITableViewDataSource
>
{
    NSArray * _nameArray;
}
@end

@implementation SetViewController

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    [[YMBaseTabBarViewController shareInstance] setTabbarHidden];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setTopTitleWithTitle:@"设置"];
    [self setLeftItemWithTitle:nil OrImage:@"navLeftBtn.png"];
    _nameArray = [[NSArray alloc]initWithObjects:@"清除缓存",@"检查新版本",@"关于我们", nil];
    [self creatTableView];
}

-(void)creatTableView
{
    UITableView * table_view  = [[UITableView alloc]initWithFrame:CGRectMake(0, 0,MainSCreen.width , MainSCreen.height - nav_Height) style:UITableViewStylePlain];
    table_view.delegate       = self;
    table_view.dataSource     = self;
    table_view.rowHeight      = 100;
    table_view.backgroundColor = TableView_Default_BGColor;
    [table_view setTableFooterView:[[UIView alloc] init]];
    [self.view addSubview:table_view];
}
#pragma mark ---------------------------------UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
    
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
{
    return 1;
}

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return TableView_Default_SectionHight;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return TableView_Default_RowHight;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellStr1 = @"cellstr";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellStr1];
    if (!cell)
    {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellStr1];
        
    }
    cell.accessoryType  = UITableViewCellAccessoryDisclosureIndicator;
    cell.textLabel.text = _nameArray[indexPath.row];
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
